import store from "@/store"

const commonOnLoad = function (routesConfig,options,referenceId) {  
	let query = {
		routesConfig: routesConfig,
		query:options
	}
	uni.setStorage({
		key: 'beforeLoginUrlQuery',
		data: query,
	});
	store.commit("SET_REFERENCE_ID", referenceId);
	//强制登录 或 微信状态下 静默登录
// #ifdef H5  
	if (!store.getters.hasLogin && (store.state.forcedLogin || store.state.isWechat )) {
		store.dispatch("reLogin");
	}
// #endif  
}; 

export default {  
    commonOnLoad,  
} 